#!/bin/sh
echo "Converting MySQL code to SQLite"
sqlt -f MySQL -t SQLite createMySQL.sql > createLite.sql
echo "Creating DBNames.java"
groovy sqliteToJava
echo "Moving DBNames.java into project structure"
cp DBNames.java ../../OSM-2/src/de/fuberlin/osm2/data/DBNames.java
cp dataBaseModel.png ../../OSM-2/doc/dataBase/dataBaseModel.png

echo "doing svn update:"
svn  up ../../
echo "Committing schema and image"
svn ci ../../OSM-2/src/de/fuberlin/osm2/data/DBNames.java -m "AUTOMATIC SCRIPT: schema update" --username amit.j@fu-berlin.de
svn ci ../../OSM-2/doc/dataBase/dataBaseModel.png -m "AUTOMATIC SCRIPT: schema image update" --username amit.j@fu-berlin.de
echo "Done."


